#ifndef TOOLS_TCPCLIENT_INTERFACE_H_
#define TOOLS_TCPCLIENT_INTERFACE_H_

#include <stdint.h>
#include <stddef.h>
#include "ITcpListener.h"
#include "Global.h"
#include <memory>

namespace Tool
{

class ExportAPI TcpClient
{
public:
    TcpClient(ITcpListener *listener);
    ~TcpClient();
    bool Start();
    bool Stop();
    bool Connect(const char* remoteAddress, uint16_t port);
    bool Send(const void* buffer, size_t length);

private:
    void IoThreadFunction();
    struct TcpClientPrivater;
    struct PerIoBuffer;
    struct MessageBuffer;
    std::unique_ptr<TcpClientPrivater> m_privater;
};

}
#endif
